/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.edu.unifei.portal.modelo;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;

/**
 *
 * @author Cristiano Affá
 */
@Entity
public class Empresa {

    private String razaoSocial;
    @Id
    private String cnpj;

    public String getCnpj() {
        return cnpj;
    }

    public void setCnpj(String cnpj) {
        this.cnpj = cnpj;
    }

    public String getRazaoSocial() {
        return razaoSocial;
    }

    public void setRazaoSocial(String razaoSocial) {
        this.razaoSocial = razaoSocial;
    }
    @OneToMany
    private List<Gestor> gestores = new ArrayList<Gestor>();

    public boolean addGestor(Gestor v) {
        return gestores.add(v);
    }

    public int sizeOfGestor() {
        return gestores.size();
    }

    public Iterator<Gestor> iteratorGestor() {
        return gestores.iterator();
    }

    public Gestor removeGestor(int idx) {
        return gestores.remove(idx);
    }
}
